package student.design_pattern.observer_pattern;

import cn.hutool.core.lang.Console;

public class ObserverB implements Observer {

    // 观察者状态
    private String observerState;

    @Override
    public void update(String newState) {
        //更新观察者状态，让它与目标状态一致
        observerState = newState;
        Console.log("SZH", "接收到消息：" + newState + "；我是B模块，快来抢吧！！");
    }
}